export default function api(api='user-center',action, params={},title="加载中") {
  return new Promise((resolve, reject) => {
	uni.showLoading({
		title: title
	});
    uniCloud.callFunction({
    	name: api,
    	data: {
    		action,
    		params
    	}
	}).then(({result})=>{
		resolve(result)
		uni.hideLoading()
	})
  })
}